package com.xinghou.platform.entity.resp;

import com.xinghou.platform.model.main.Subject;

/**
 * Created by qingshengzheng on 16/6/23.
 */
public class SubjectResp {
    //话题id
    public String id;
    public String subjectid;
    //话题名
    public String title;
    //封面图
    public String thumurl;
    //话题url
    public String url;
    //创建时间
    public String createtime;

    //最热回复
    public String hotreply;
    //当前用户是否收藏
    public String isfavorite;
    //浏览数
    public String joinnum;

    //浏览数
    public String realjoinnum;
    //回复数
    public String replynum;
    //分享数
    public String sharenum;
    //站外点击数
    public String clicknum;

    public String pubtime;

    public String nickname;
    public String headurl;
    //发布用户uid
    public String uid;
    //发布话题用户头像
    public String userhead;
    //发布话题用户昵称
    public String username;
    //操作者
    public String operator;



    public String getHotreply() {
        return hotreply;
    }

    public SubjectResp setHotreply(String hotreply) {
        this.hotreply = hotreply;
        return this;
    }

    public String getIsfavorite() {
        return isfavorite;
    }

    public SubjectResp setIsfavorite(String isfavorite) {
        this.isfavorite = isfavorite;
        return this;
    }

    public String getJoinnum() {
        return joinnum;
    }

    public SubjectResp setJoinnum(String joinnum) {
        this.joinnum = joinnum;
        return this;
    }

    public String getReplynum() {
        return replynum;
    }

    public SubjectResp setReplynum(String replynum) {
        this.replynum = replynum;
        return this;
    }

    public String getSubjectid() {
        return subjectid;
    }

    public SubjectResp setSubjectid(String subjectid) {
        this.subjectid = subjectid;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public SubjectResp setTitle(String title) {
        this.title = title;
        return this;
    }

    public String getThumurl() {
        return thumurl;
    }

    public SubjectResp setThumurl(String thumurl) {
        this.thumurl = thumurl;
        return this;
    }

    public String getUserhead() {
        return userhead;
    }

    public SubjectResp setUserhead(String userhead) {
        this.userhead = userhead;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public SubjectResp setUrl(String url) {
        this.url = url;
        return this;
    }

    public String getUid() {
        return uid;
    }

    public SubjectResp setUid(String uid) {
        this.uid = uid;
        return this;
    }

    public String getUsername() {
        return username;
    }

    public SubjectResp setUsername(String username) {
        this.username = username;
        return this;
    }

    public String getCreatetime() {

        return createtime;
    }

    public SubjectResp setCreatetime(String createtime) {
        this.createtime = createtime;
        return this;
    }


    public static SubjectResp initFromSubject(Subject subject)
    {
        SubjectResp subjectResp = new SubjectResp();
        subjectResp.id=String.valueOf(subject.getId());
        subjectResp.subjectid=String.valueOf(subject.getId());
        subjectResp.createtime=String.valueOf(subject.getCreatetime());
        subjectResp.url=subject.getUrl();
        subjectResp.thumurl=subject.getThumurl();
        subjectResp.uid = String.valueOf(subject.getUid());
        subjectResp.title = subject.getTitle();
        subjectResp.pubtime= String.valueOf(subject.getPubtime());
        subjectResp.operator= String.valueOf(subject.getOperator());
        return subjectResp;
    }

    public String getClicknum() {
        return clicknum;
    }

    public SubjectResp setClicknum(String clicknum) {
        this.clicknum = clicknum;
        return this;
    }

    public String getSharenum() {
        return sharenum;
    }

    public SubjectResp setSharenum(String sharenum) {
        this.sharenum = sharenum;
        return this;
    }
}
